# -*- coding: utf-8 -*-
"""
@Time ： 2020/8/4 15:59
@Auth ： Mr. JJ_Cloud
@Company ：testingedu.com.cn
@Function ：请输入模块功能描述
"""
# 创建一个冒泡排序的函数
def buble_sort(height):
    j = 0
    while j < len(height) - 1:
        i = 1
        while i < len(height) - j:
            if height[i] < height[i - 1]:
                height[i], height[i - 1] = height[i - 1], height[i]
            i += 1
        j += 1

h = [155,187,172,160,163,166,173,182,165,159]
# 调排序函数
buble_sort(h)
print(h)

def set_x(x):
    """
    改变x的值，传值
    :param x:形参
    :return:
    """
    x = 1

y = 2
# y称为实参，实际传入的参数

set_x(y)
print(y)

def set_l(list2):
    list2[1] = 10

list1 = [1,2,3]
set_l(list1)
print(list1)